From: Michael Wood Date: Mon, 15 Jul 2013 18:16:30 +0000 (+0100) Subject: popupMenu: Don't count the separator as an item when returning isEmpty X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3927 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=658db43ad3bd43e627fb167c05c4fb51577860a6;p=gnome-shell.git popupMenu: Don't count the separator as an item when returning isEmpty If we have a separator don't use it's possibly-unsynced visibility to determine if the menu is empty or not. https://bugzilla.gnome.org/show_bug.cgi?id=70386 --- diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index 42dd6f7e9..78f25db68 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -722,6 +722,8 @@ const PopupMenuBase = new Lang.Class({ isEmpty: function() { let hasVisibleChildren = this.box.get_children().some(function(child) { + if (child._delegate instanceof PopupSeparatorMenuItem) + return false; return child.visible; });